package com.weichuang.dao.impl;

import com.weichuang.dao.UserDao;
import com.weichuang.domain.User;

import java.util.List;
import java.util.Map;
import java.util.Properties;

public class UserDaoImpl implements UserDao {

    /*//重写无参构造
    public UserDaoImpl(){
        System.out.println("UserDaoImpl创建了");
    }

    //初始化方法
    public void init(){
        System.out.println("初始化方法被调用了");
    }

    //销毁方法
    public void destroy(){
        System.out.println("销毁方法被调用了");
    }*/

    private String userName;
    private int age;

    private List<String> strList;

    private Map<String, User> userMap;

    private Properties properties;

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public void setUserMap(Map<String, User> userMap) {
        this.userMap = userMap;
    }

    public void setStrList(List<String> strList) {
        this.strList = strList;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public void save() {
        System.out.println(properties);
        System.out.println(userMap);
        //System.out.println(userName + "," + age);
        //System.out.println(strList);
        //System.out.println("UserDao保存方法被调用了");
    }
}
